package com.itheima.aop;

import org.aspectj.lang.ProceedingJoinPoint;

/**
 * @author cp
 * @className Teacher
 * @description TODO
 * @create 2020/12/7 15:00
 **/
public class Teacher {
    public void before(){
        System.out.println("每日回顾！");
    }

    public void afterReturing(){
        System.out.println("每日总结！");
    }

    public void afterThrowing(){
        System.out.println("解答问题！");
    }

    public void after(){
        System.out.println("高薪就业！");
    }

    public Object around(ProceedingJoinPoint pjp){
        System.out.println("每日回顾！");
        Object ret = null;
        try {
            ret = pjp.proceed();
            System.out.println("每日总结！");
        } catch (Throwable throwable) {
            System.out.println("解答问题！");
        }finally {
            System.out.println("高薪就业！");
        }
        return ret;
    }
}
